home *** CD-ROM | disk | FTP | other *** search
-
- /******************************************************************************
- **
- ** Project Name: InstallerMaker 3.0 Diagnostic Code
- ** File Name: IMPackages.h
- **
- ** Description: These are interfaces for manipulating the IM 3.0 package
- ** bit strings.
- **
- ** Packages field
- ** ==============
- **
- ** The interpretation of packages for the code rsrcs is:
- **
- ** IM 2.0: packages should be interpreted as a 16 bit field.
- ** Bit 0 is the lowest bit.
- **
- ** IM 3.0: packages should be interpreted as a 128 bit field.
- ** packages[0] contains bits 0-31 where 0 is the lowest bit.
- ** packages[1] contains bits 32-63 where 32 is the lowest bit.
- ** Similarly for packages[2] and packages[3].
- **
- ** packages is a bit mask where bit 0 set means std pkg, bit 1
- ** set means pkg A, bit 2 means B, etc. For compatibility, a
- ** value of zero is synonymous with all ones.
- **
- ** The packages field typically specifies the currently selected
- ** pkgs unless otherwise noted.
- **
- **
- ** Copyright© 1994-1995 Aladdin Systems, inc.
- **
- *******************************************************************************
- ** A U T H O R I D E N T I T Y
- *******************************************************************************
- **
- ** Initials Name
- ** -------- -----------------------------------------------
- ** RMT Robert Thorne
- **
- *******************************************************************************
- ** R E V I S I O N H I S T O R Y
- *******************************************************************************
- **
- ** Date Time Author Description
- ** -------- ----- ------ ---------------------------------------------
- ** 1/2/95 RMT Pulled from test code for new file
- **
- ******************************************************************************/
-
- #ifndef __DIAG_PACKAGES
- #define __DIAG_PACKAGES
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- short GetPackageNumber ( StringPtr pkgStr ) ;
- // Valid formats are "Std" for "Standard Package", "A"..."Z", and "AA".."DW".
- // Pass these as Pascal strings. This routine is case-insensitive.
-
- char *ConstructPkgString ( unsigned long *packages, char *store, short storeLen ) ;
- // Returns a comma-delimited string listing the package bits set. Note that
- // this list can get rather long: an average of 3 chars per set bit means you
- // can require up to 360 bytes if all bits are set. storeLen lets you protect
- // from running over the end of the string by having the string end in a "…"
-
-
- char *GetPkgLetters ( short pkgCode, char *smallStr ) ;
- // Passes back a string that represents that package number. Currently, the
- // largest string this passes back is 4 bytes (for "Std"), but allocate a little
- // more for safety.
-
- short GetPackageBit ( unsigned long *packages, short bitNo ) ; // 0 or 1
- // Checks if bit # bitNo is set in the packages array. This passes back
- // 0 if not set, 1 if set, and -1 for an illegal bitNo.
-
- void SetPackageBit ( unsigned long *packages, short bitNo, Boolean turnOn) ;
- // Turns on or turns off bit bitNo.
-
- Boolean ParsePackageString ( unsigned long *packages, Str255 packageStr ) ;
- // Parses a comma delimited string that contains package bit information.
-
-
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif